package com.example.springbootdeep2.configuration;

import com.example.springbootdeep2.annotation.ConditionalOnSystem;
import org.springframework.context.annotation.Bean;

public class HelloWorldConfiguration {

    @Bean
    @ConditionalOnSystem(system = "linux") // 条件装配 前置条件
    SayHelloWorld sayHelloWorld(){
        System.out.println("=================>加载sayHelloWorld");
        return new SayHelloWorld();
    }

}
